<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		你按下的是:
		<div style="border: 1px solid skyblue;width: 200px;height: 50px;background-color: deepskyblue;">

		</div>
		<!--js代码封装与引入-->
		<script type="text/javascript" src="../js/02获取鼠标按下的值.js"></script>
		<!--<script type="text/javascript">
			function show(e) {
				var val = e.key;
				document.getElementsByTagName("div")[0].innerHTML = val;
				console.log(e);
			}

			document.onkeydown = function(e) {
					show(e);
			}
		</script>-->
	</body>

</html>